<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        body{
            background:url("img/1.jpg") no-repeat;
        }
    </style>
    <link rel="stylesheet" href="layui-v2.6.8/layui/css/layui.css">
</head>
<body>
<ul class="layui-nav">
    <li class="layui-nav-item" ><a href="qiandao.html" style="font-size: 20px">我要签到</a></li>
    <li class="layui-nav-item" ><a href="out.html" style="font-size: 20px">我要离开</a></li>
    <li class="logo" style="float: right"><a href=""><img src="img/logo.png" width="60px" height="60px"></a></li>
    <li class="layui-nav-item" style="float: right" ><a href="zuche.html" style="font-size: 20px">我要注册</a></li>
    <li class="text_center" style="float: right;margin-right: 400px;line-height: 60px;color: gray;font-size: 30px" >智能软件研发实验室</li>
    <li class="layui-nav-item" ><a href="total.html" style="font-size: 20px">签到统计</a></li>
</ul>
<div>
    <form action="" method="get" style="text-align: center;line-height: 15px;margin-top: 150px">
        <p>
            用户名：<input type="text" name="username" style="height: 30px;width: 200px;border-radius: 10px;">
        </p>
        <br>
        <p>
            时&nbsp&nbsp&nbsp 间：<input type="time" name="time"style="height: 30px;width: 200px;border-radius: 10px">
        </p>
        <p>
            <input type="submit" name="Button" value="离开" style="width: 50px;height: 25px;background: #9F9F9F;margin-right: 40px;margin-top: 10px;border-radius: 5px" id="btn">
            <input type="reset" name="Reset" value="重置"style="width: 50px;height: 25px;background: #9F9F9F;margin-right: -50px;border-radius: 5px">
        </p>
    </form>
</div>
</body>
<script>
    $("#btn").click(function (){
        var username=$("username").valueOf();
        var time=$("time").valueOf()
        $.ajax({
            url: "/login",
            type: "post",
            data:{
                username:username,
                time:time
            },
            success: function (data) {
                alert("签到成功")
            },
            false:function (data){
                alter("登录失败")
            }
        });
    })
</script>
</html>